WTP Eclipse ALF Workspace Configuration Document version 1.0M3
IMPORTANT!!!! Assumptions for this sample
These assumptions are hard coded in various places in the sample. In some places they have been externalized to configuration files. In others it is necessary to change the source to move the configuration. An attempt has been made to identify these hard-coded and configured locations in these instructions but this may not be comprehensive and that aspect has not tested. We hope to improve this in the future
Prerequisites
Installation
Java
Install downloaded jdk1.5 and set the environment variable
JAVA_HOME=java home directory.
Eclipse
Extract the Downloaded eclipse wtp-all-in-one-sdk-R-1.0.2-200604280245-win32.zip.
Tomcat
Extract the Downloaded ApacheTomcat5.5.x.zip and set the environment variable.
CATALINA_HOME=Jakarta Home directory.
ActiveBpel
Extract the downloaded activebpel-2.x and click install.bat to install the activebpel in Tomcat.
Make sure that following links are working:
http://localhost:8080/active-bpel/
http://localhost:8080/BpelAdmin
Note: make sure that CATALINA_HOME and JAVA_HOME are set properly.
Axis
axis-bin-1.2.1/axis-1.2.1/webapps to CATALINA_HOME/webapps directory.
Note: Axis 1.3 jars are required for the org.eclipse.alf.eventManager and the org.eclipse.alf.eventManager.client projects. The other web service projects were created with Eclipse WTP and use axis 1.2.1.
ANT
Extract the apache-ant-1.6.5.zip and set the ANT_HOME=Ant home directory
Create the Eclipse Workspace
The source for this sample is stored in the alf CVS in the folders org.eclipse.alf/eventmgr and org.eclipse.alf/examples/POCsample.
Open Eclipse and create a New Workspace called ALFSampleWorkspace.
Note: Some parts of this sample require that this workspace be located at “C:\ALFSampleWorkspace”
Connect to the eclipse CVS using the anonymous connection and retrieve these folders, creating the appropriate projects from the source as described in the instructions below.
org.eclipse.alf/eventmgr
org.eclipse.alf.eventManager - the ALF event manager source project
ALFPlugin - the ALF event map configuration tools source project
org.eclipse.alf/examples/POCsample
ALFConfig - the POC event map project created by the ALF Plugin
DimensionPOC - the POC stub web service WTP project for Serena Dimensions
Openmake - the POC stub web service WTP project Catalyst Openmake
org.eclipse.alf.eventManager.client - a sample ALF event manager client project
ServiceFlows - a set of service flows in ActiveBPEL .bpr form
SubversionALF - the POC stub web service WTP project for Subversion
TTServicesAlf - the POC stub web service WTP project for Serena TeamTrack
The ALF sample may be downloaded as a preconfigured workspace from the ALF Download site or manually configured from the CVS source repository. Both include the source but the CVS repository may contain more recent code but may be less stable. Starting with the .zip file is recommended but if you wish to start with the source directly from CVS, skip to step 2 below.
To use the downloaded “.zip” file:
a) Expand the .zip file it so that the contained folder “ALFSampleWorkspace” is created at “c:\ALFSampleWorkspace”
b) Start WTP Eclipse and load the workspace at “c:\ALFSampleWorkspace”
c) Copy the downloaded jdom.jar to ALFPlugin\lib directory.
d) Copy the downloaded jdom.jar into TTServicesAlf /Webcontent/WEB-INF/lib Directory.( for reading the sample XML files)
Goto Step 4 “Configure
Tomcat Server with WTP Eclipse”
The next few steps re-create the content of the downloaded “.zip” file. If you are using the downloaded .zip file skip to step 4.
1) Copy the project org.eclipse.alf.eventManager from \org.eclipse.alf\eventmgr and import into WTP Eclipse
i) Copy the following jars from axis-1_3/ webapps/axis/WEB-INF/lib directory into org.eclipse.alf.eventManager / WebContent/lib directory.
axis.jar
commons-discovery-0.2.jar
commons-logging-1.0.4.jar
jaxrpc.jar
saaj.jar
wsdl4j-1.5.1.jar
log4j-1.2.8.jar
ii) Copy servlet-api.jar from CATALINA_HOME/common/lib to org.eclipse.alf.eventManager / lib directory
iii) Build the Project
iv) Import the alfeventmgr.war as eclipse project.
Steps to import war Project
In File menu à Click importà Select WAR fileàClick next and browse the war file from /Workspace/ org.eclipse.alf.eventManager directory.
2) Copy the project ALFPlugin from \org.eclipse.alf\eventmgr and import into WTP Eclipse
a. Copy the downloaded jdom.jar to ALFPlugin\lib directory.
b. Build the project
c. Copy the ALFPlugin_1.0.0.jar from workspace/ALFPlugin into eclipse/plugins directory
d. Close and open the eclipse in clean mode (eclipse –clean)
1) Copy the project org.eclipse.alf.eventManager.client from org.eclipse.alf\examples\POCSample and import into WTP Eclipse.
i) Copy the following jars from axis-1_3/webapps/axis/WEB-INF/lib directory org.eclipse.alf.eventManager.client / lib directory
axis.jar
commons-discovery-0.2.jar
commons-logging-1.0.4.jar
jaxrpc.jar
wsdl4j-1.5.1.jar
saaj.jar
log4j-1.2.8.jar
2) Copy the project DimensionPOC from org.eclipse.alf\examples\POCSample and import into WTP Eclipse
Copy the following jars from CATALINA_HOME/ webapps/axis/WEB-INF/lib directory into DimensionPOC/ WebContent/WEB-INF/lib
axis.jar
commons-discovery-0.2.jar
commons-logging-1.0.4.jar
jaxrpc.jar
saaj.jar
wsdl4j-1.5.1.jar
3) Copy the project SubversionALF from org.eclipse.alf\examples\POCSample and import into WTP Eclipse
Copy the following jars from CATALINA_HOME/ webapps/axis/WEB-INF/lib directory into SubversionALF/ WebContent/WEB-INF/lib
axis.jar
commons-discovery-0.2.jar
commons-logging-1.0.4.jar
jaxrpc.jar
saaj.jar
wsdl4j-1.5.1.jar
4) Copy the project Openmake from org.eclipse.alf\examples\POCSample and import into WTP Eclipse
i) Copy the following jars from CATALINA_HOME/ webapps/axis/WEB-INF/lib directory into Openmake/ WebContent/WEB-INF/lib
axis.jar
commons-discovery-0.2.jar
commons-logging-1.0.4.jar
jaxrpc.jar
saaj.jar
Wsdl4j-1.5.1.jar
ii) Copy the downloaded junit.jar into Openmake/Webcontent/WEB-INF/lib directory (Required in run time)
Note: this project assumes the path C:\ALFSampleWorkspace to find its configuration at runtime. Edit the file “EventManagerProperties.java” and change the line:
_basePath ="C:\\ALFSampleWorkspace\\Openmake\\WebContent\\conf";
and edit the file build.xml and change this line to include the drive leter if eclipse is installed on a different drive from the project
<property name="Workspace" value="/ALFSampleWorkspace" />
5) Copy the project TTServicesAlf from org.eclipse.alf\examples\POCSample and import into WTP Eclipse
i) Copy the following jars from CATALINA_HOME/ webapps/axis/WEB-INF/lib directory into TTServicesAlf/ WebContent/WEB-INF/lib
axis.jar
commons-discovery-0.2.jar
commons-logging-1.0.4.jar
jaxrpc.jar
saaj.jar
wsdl4j-1.5.1.jar
ii) Copy the downloaded jdom.jar into TTServicesAlf /Webcontent/WEB-INF/lib Directory.( for reading the sample XML files)
Note: this projects assumes the path C:\ALFSampleWorkspace to find its configuration at runtime. Edit the file “BuildControl.java” and change the line:
private static String ROOT_PATH="C:/ALFSampleWorkspace/TTServicesAlf/WebContent/conf/";
and the file “BuildRequest.java” and change the lines:
private static String ALF_SERVER = "http://localhost:8080/alfeventmgr/";
private static String ROOT_PATH="C:/ALFSampleWorkspace/TTServicesAlf/WebContent/conf/";
and edit the file build.xml and change this line to include the drive leter if eclipse is installed on a different drive from the project
<property name="Workspace" value="/ALFSampleWorkspace"
/>
Note: We have so far been unsuccessful importing the ActiveBPEL 2.0 .war into eclipse so the older ActiveBPEL 1.2 is used here. If you wish to use ActiveBPEL 2.0 you should consider a standalone deployment (see standalone instructions below)
a) Import the activebpel.war as eclipse project.
Steps to import war Project:
In File menu à
Click importà
Select WAR fileàClick next
Browse the war file from CATALINA_HOME/webapps directory.
b) Copy the ae-client-config.wsdd and ae-server-config.wsdd from CATALINA_HOME/shared/classes to active-bpel/importedclasses directory.
c) Copy the following jars from CATALINA_HOME/shared/lib to active-bpel\WebContent\WEB-INF\lib directory
ae_axisweb.jar
ae_rt.jar
ae_rtaxis.jar
ae_rtaxisbpel.jar
ae_rtbpel.jar
ae_rtbpelsvr.jar
ae_tamino.jar
ae_wsio.jar
axis.jar
castor-0.9.6-xml.jar
commonj-twm.jar
commons-codec-1.3.jar
commons-dbutils-1.0.jar
commons-discovery.jar
commons-httpclient-3.0-rc3.jar
commons-logging.jar
jaxen-1.1-beta-2.jar
jaxrpc.jar
log4j.jar
resolver.jar
saaj.jar
TaminoAPI4J.jar
TaminoJCA.jar
wsdl4j.jar
xercesImpl.jar
xml-apis.jar
xmlParserAPIs.jar
Note: the list of jar files may differ for different versions of active-bpel.
The projects should build without errors but with a fair number of warnings. Most of these are a result of the code generated by Axis.
Note: it may be necessary to perform some combination of refresh,
clean, close project, open project and build to ensure that the projects are
synchronized and build correctly. This
appears to be an instability problem with eclipse WTP and may improve with
later versions.
a) Select the Server Runtime:
In windows menuàClick Preferences
àSelect server, Installed
runtimes. Add the Apache Tomcat v5.5
version Server for run time environment.
b) Create Server Project:
In File menuàselect new àclick otheràSelect Server and
click next button to configure the server.
Pick the Apache Tomcat v5.5 runtime. By default this should
create a server project called
Tomcat v5.5 Server @ localhost-config
Add all the projects:
active-bpel
alfeventmgr
DimensionPOC
Openmake
SubversionALF
TTServicesAlf
c) Create bpr directory under the directory Servers/Tomcat v5.5 Server @ localhost-config.
For example:
C:\ALFSampleWorkspace\Servers\Tomcat v5.5 Server @ localhost-config\bpr
d) Copy the aeEngineConfig.xml , AeEngineAdmin.wsr
from the directory
CATALINA_HOME/bpr
to the directory
Servers/ Tomcat v5.5 Server @ localhost-config /bpr
e) Change the deployment directory of Bpr in active-bpel/Webcontent/WEB-INF/web.xml file. to point the “bpr” directory just created
Example:
<init-param>
<param-name>deployment.directory</param-name>
<param-value>C:\ALFSampleWorkspace\Servers\Tomcat v5.5 Server @ localhost-config\bpr</param-value>
</init-param>
Change the default engine configuration in bpr/ aeEngineConfig.xml as follows:
<entry name="ValidateServiceMessages" value="false"/>
<entry name="AllowEmptyQuerySelection" value="true"/>
<entry name="AllowCreateXPath" value="true"/>
<entry name="Logging" value="true"/>
f) Copy the TTService.bpr, SubversionBuildServiceFlow.bpr and BuildServiceFlow.bpr
from the downloadable directory
org.eclipse.alf\examples\POCSample\ServiceFlows
to the directory
Servers/ Tomcat v5.5 Server @ localhost-config /bpr
a)
Open
the Servers folder in the Package Explorer.
b)
Right
Click the “Tomcat
v5.5 Server @ localhost-config” Project
c)
select
Run asàClick Run on server and
d) select the Tomcat server then “Run”
Note: it may be necessary to perform some combination of “refresh”,
republish, rebuild, close and reload to ensure the
eclipse WTP tomcat server is in synch with the various projects
Make sure that Web services exposed by entering following endpoint URLS in browser
http://localhost:8080/DimensionPOC/services
http://localhost:8080/SubversionALF/services
http://localhost:8080/Openmake/services
http://localhost:8080/TTServicesAlf/services
ActiveBpel Service URLs
http://localhost:8080/active-bpel/services/BuildServiceFlowService?EventNoticeWithACK
http://localhost:8080/active-bpel/services/TTServiceService?EventNoticeWithACK
http://localhost:8080/active-bpel/services/SubversionBuildServiceFlowService?EventNoticeWithACK
a) Copy the ALFPlugin_1.0.0.jar from workspace/ALFPlugin into eclipse/plugins directory
b) Close and open the eclipse in clean mode (eclipse –clean)
c) Copy the project ALFConfig from org.eclipse.alf\examples\POCSample and import into WTP Eclipse
ALFConfig Project is used to create the EventActionMap.xml.
i) ALFEvents.evt screen used to register New Events.
ii) ALFEvents.svc screen used to register Service Flows.
iii) ALFEvents.alf is used to create the EventActionmap.xml file.
EventActionMap.xml maps the events to the corresponding service flow.
Note: CATALINA_HOME/webapps/alfeventmgr/WEB-INF/ and workspace/alfeventmgr WebContent/WEB-INF/ should have EventActionMap.xml file
d) Specify the Server Name and location in ALFConfig/serverconfig.xml file:
Example:
<server>
<servername>ALF POC Stand alone server</servername>
<location>C:\apache-tomcat-5.5.12_8080\webapps\alfeventmgr\WEB-INF\EventActionMap.xml
</location>
</server>
<server>
<servername>WTP Eclipse</servername>
<location>C:\ALFSampleWorkspace\alfeventmgr\WebContent\WEB-INF\EventActionMap.xml</location>
</server>
Note: Currently the EventActionMap.xml refresh feature assumes local absolute paths (eg: C:\ALFSampleWorkspace) and the serverconfig.xml file should reflect this. “C:\apache-tomcat-5.5.12_8080” is an example install location. The value of the environment variable “CATALINA_HOME” should be used.
e) Using the import button on the ALF Event Map Screen, you can import the Eventactionmap.xml file from the event manager. The deploy button in ALF Event Map Screen updates the Event Manager copy of the EventActionmap.xml file and request the event manager to reload it.
Note: There appears to be some instability in eclipse WTP that prevents
the event manager from reloading the event map when it is running inside
eclipse. After deploying the edited event map it is necessary perform some
combinations of starting and stopping the eclipse tomcat sever, refreshing the
event manager project, opening and closing the event manager project and
republishing the projects to the eclipse tomcat server before the eclipse
tomcat server. Unfortunately the exact
combination that will force the refresh has not been consistently determined.
Enter the following URL in web browser and Click ok Button.
1) http://localhost:8080/TTServicesAlf/BuildRequest.jsp
2) Click the Refresh button and see the Build results
3) Check the status in ALFSampleWorkspace\TTServicesAlf\WebContent\conf/buildrequest.xml file
Using the ALFConfig to edit the EventActionMap you can switch between using the BuildServiceFlow which calls the DimensionPOC service or the SubversionBuildService flow which calls the SubversionPOC service.
This step is only required if you wish to run the sample on
a Standalone Tomcat server outside of Eclipse.
Note that the Eclipse instance of Tomcat uses port 8080, the default, and
you will not be able to run both the Eclipse instance and an external instance
on the same port at the same time. These
instructions assume you have stopped the Eclipse instance and have started the standalone
instance of Tomcat using its “bin\startup.bat” for
example
Copy the build.xml file from org.eclipse.alf/examples/POCsample into C:\ALFSampleWorkspace and run the target deployall it will deploy all the web service war files and event manager in to stand alone Tomcat.
Make sure that Web services exposed by entering following endpoint URLs in browser.
http://localhost:8080/DimensionPOC/services
http://localhost:8080/SubversionALF/services
http://localhost:8080/Openmake/services
http://localhost:8080/TTServicesAlf/services
ActiveBpel Service URLs
http://localhost:8080/active-bpel/services/BuildServiceFlowService?EventNoticeWithACK
http://localhost:8080/active-bpel/services/TTServiceService?EventNoticeWithACK
http://localhost:8080/active-bpel/services/SubversionBuildServiceFlowService?EventNoticeWithACk
Enter the following URL in web browser and Click ok Button.
1) http://localhost:8080/TTServicesAlf/BuildRequest.jsp
2) Click the Refresh button and see the Build results
3) Check the status in ALFSampleWorkspace\TTServicesAlf\WebContent\conf/buildrequest.xml file
4) Go to the following URL and check the values in BPEL console
http://localhost:8080/BpelAdmin
and check the status.